<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\api\validate;

/**
 * 商铺验证器
 */
class Otcshop extends ApiBase
{
    
    // 验证规则
    protected $rule =   [
        'shop_name'          => 'require',
        'number_do'       =>'gt:0',
        'true_name'=>'require',
        'full_face_photo_id'=>'require',
        'negative_photo_id'=>'require',
        'hand_held_photo_id'=>'require',
        'idcard'=>'require',
        'pay_type'=>'require',
//        'ranking'       => 'require|unique:gambler_king',

    ];

    // 验证提示
    protected $message  =   [
        'shop_name.require'         => '商铺名称不能为空',
        'number_do.require'      => '余额不能为负数',
        'true_name.require'         => '真实姓名不能为空',
        'full_face_photo_id.require'         => '身份证正面图片必须上传',
        'negative_photo_id.require'         => '身份证反面图片必须上传',
        'hand_held_photo_id.require'         => '手持身份证图片必须上传',
        'idcard.require'         => '身份证不能为空',
        'pay_type.require'         => '收款方式必须选择',

    ];
    
    // 应用场景
    protected $scene = [
        'edit'  =>  ['shop_name', 'number_do'],
        'api_add'=>['shop_name','true_name','full_face_photo_id','negative_photo_id','hand_held_photo_id','idcard','pay_type']
    ];
}
